<template>
    <div class="release-time flx-align-center">
        <svgIcon iconName="icon-shijian"/>
        <span>{{ timeText + formatTimeToStr(createdAt) }}</span>
    </div>
</template>

<script setup>
import { formatTimeToStr } from '@/utils/date-util';
import svgIcon from '@/components/system/svgicon/svgicon.vue';

// ========================= 接收值 =========================
const props = defineProps({
    // 创建时间
    createdAt: String,
    // 文本
    timeText: {
        type: String,
        default: '发布于：'
    }
})
</script>

<style lang="scss" scoped>
    @import './article-release-time.scss';
</style>
